﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Input;
using System.Windows;

namespace MicroBlogClient
{
    public class AlwaysCanExecuteCommand : ICommand
    {
        Action<object> _execute;
        public AlwaysCanExecuteCommand(Action<object> execute)
        {
            _execute = execute;
        }

        #region ICommand Members
        public bool CanExecute(object parameter)
        {
            return true;
        }

        public event EventHandler CanExecuteChanged;

        public void Execute(object parameter)
        {
            if (_execute != null)
            {
                _execute(parameter);
            }
        }
        #endregion
    }
}
